package org.traffometer.packet.location;

import junit.framework.TestCase;

/**
 * Tests the functionality of the Location class. 
 *
 * @author Aaron A. Kagawa
 * @version $Id$
 */
public class TestLocation extends TestCase {

  /** 
   * Tests the major functionality of the location class.
   * @throws LocationException If an unexpected problem occurs.
   */
  public void testLatitudeDecimalConstructor() throws LocationException {
    Longitude longitude = new Longitude(1, 1, 1, Hemisphere.East);
    Latitude latitude = new Latitude(1, 1, 1, Hemisphere.North);
    Location location = new Location(longitude, latitude);
    assertEquals("checking the retrieval of the longitude object", 
        longitude, location.getLongitude());
    assertEquals("checking the retrieval of the latitude object", 
        latitude, location.getLatitude());
    assertEquals("checking the contents of the toString", 
        "1 1'1.0'' E, 1 1'1.0'' N", location.toString());
  }
  
}